import routers from "./router";
import {createRouter, createWebHistory} from "vue-router/dist/vue-router";
export default createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes: routers,
    // 路由跳转时，页面始终滚动到顶部
    scrollBehavior(to, from, savedPosition) {
        // 始终滚动到顶部
        return { top: 0 }
    },
});